package com.byxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.byxy.dao.ForumDao;
import com.byxy.entity.Forum;
import com.byxy.service.ForumService;

@Transactional
@Service
public class ForumServiceImpl implements ForumService {
	@Autowired
	private ForumDao forumDao;

	public List<Forum> findAll() {
		return forumDao.findAll();
	}

	public Forum get(Integer forumId) {
		return forumDao.get(forumId);
	}

	public void add(String forumName) {
		forumDao.add(forumName);
	}

	public void delete(Integer forumId) {
		forumDao.delete(forumId);
	}

	public void update(Integer forumName, Integer forumId) {
		forumDao.update(forumName, forumId);
	}

}
